package com.my12306.train.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.common.model.vo.PageVo;
import com.my12306.train.model.entity.TrainScheduleEntity;
import com.my12306.train.model.vo.TrainScheduleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 发车表(车次表)
 *
 * @author ËÕÄÁÏ¦
 * @email
 * @date 2020-07-24 20:58:07
 */
@Mapper
public interface TrainScheduleDao extends BaseMapper<TrainScheduleEntity> {
    /**
     * 分页查询
     *
     * @param pageVo
     * @param logicDelete
     * @return
     */
    List<TrainScheduleEntity> queryTrainSchedulePage(@Param("pageVo") PageVo pageVo, @Param("logicDelete") int logicDelete);

    /**
     * 分页查询总数
     *
     * @param pageVo
     * @param logicDelete
     * @return
     */
    Integer queryTrainScheduleCount(PageVo pageVo, Integer logicDelete);

    /**
     * 根据ids批量删除车次
     *
     * @param trainIds
     * @param logicDelete
     */
    void deleteTrainScheduleBatchByIds(@Param("list") List<Long> trainIds, @Param("logicDelete") Integer logicDelete);

    /**
     * 根据id查询
     * @param id
     * @param logicDelete
     * @return
     */
    TrainScheduleVo queryTrainScheduleVoById(@Param("id") Long id, @Param("logicDelete") int logicDelete);

    /**
     * 查询所有车次
     * @param logicDelete
     * @return
     */
    List<TrainScheduleEntity> queryAllTrainSchedule(@Param("logicDelete") int logicDelete);
}
